/***********************************************************************
 * Module:  PhongBan.cs
 * Author:  Tuan Nguyen
 * Purpose: Definition of the Class PhongBan
 ***********************************************************************/

using System;

public class PhongBan
{
   public int MaPhongBan;
   public string TenPhongBan;
   public string DiaChiPhongBan;
   public string DienThoaiPhong;
   
   public System.Collections.ArrayList QuanLyTrangThietBi;
   public System.Collections.ArrayList nhaBep;
   
   /// <pdGenerated>default getter</pdGenerated>
   public System.Collections.ArrayList GetNhaBep()
   {
      if (nhaBep == null)
         nhaBep = new System.Collections.ArrayList();
      return nhaBep;
   }
   
   /// <pdGenerated>default setter</pdGenerated>
   public void SetNhaBep(System.Collections.ArrayList newNhaBep)
   {
      RemoveAllNhaBep();
      foreach (NhaBep oNhaBep in newNhaBep)
         AddNhaBep(oNhaBep);
   }
   
   /// <pdGenerated>default Add</pdGenerated>
   public void AddNhaBep(NhaBep newNhaBep)
   {
      if (newNhaBep == null)
         return;
      if (this.nhaBep == null)
         this.nhaBep = new System.Collections.ArrayList();
      if (!this.nhaBep.Contains(newNhaBep))
      {
         this.nhaBep.Add(newNhaBep);
         newNhaBep.SetPhongBan(this);      
      }
   }
   
   /// <pdGenerated>default Remove</pdGenerated>
   public void RemoveNhaBep(NhaBep oldNhaBep)
   {
      if (oldNhaBep == null)
         return;
      if (this.nhaBep != null)
         if (this.nhaBep.Contains(oldNhaBep))
         {
            this.nhaBep.Remove(oldNhaBep);
            oldNhaBep.SetPhongBan((PhongBan)null);
         }
   }
   
   /// <pdGenerated>default removeAll</pdGenerated>
   public void RemoveAllNhaBep()
   {
      if (nhaBep != null)
      {
         System.Collections.ArrayList tmpNhaBep = new System.Collections.ArrayList();
         foreach (NhaBep oldNhaBep in nhaBep)
            tmpNhaBep.Add(oldNhaBep);
         nhaBep.Clear();
         foreach (NhaBep oldNhaBep in tmpNhaBep)
            oldNhaBep.SetPhongBan((PhongBan)null);
         tmpNhaBep.Clear();
      }
   }
   public System.Collections.ArrayList quayHang;
   
   /// <pdGenerated>default getter</pdGenerated>
   public System.Collections.ArrayList GetQuayHang()
   {
      if (quayHang == null)
         quayHang = new System.Collections.ArrayList();
      return quayHang;
   }
   
   /// <pdGenerated>default setter</pdGenerated>
   public void SetQuayHang(System.Collections.ArrayList newQuayHang)
   {
      RemoveAllQuayHang();
      foreach (QuayHang oQuayHang in newQuayHang)
         AddQuayHang(oQuayHang);
   }
   
   /// <pdGenerated>default Add</pdGenerated>
   public void AddQuayHang(QuayHang newQuayHang)
   {
      if (newQuayHang == null)
         return;
      if (this.quayHang == null)
         this.quayHang = new System.Collections.ArrayList();
      if (!this.quayHang.Contains(newQuayHang))
      {
         this.quayHang.Add(newQuayHang);
         newQuayHang.SetPhongBan(this);      
      }
   }
   
   /// <pdGenerated>default Remove</pdGenerated>
   public void RemoveQuayHang(QuayHang oldQuayHang)
   {
      if (oldQuayHang == null)
         return;
      if (this.quayHang != null)
         if (this.quayHang.Contains(oldQuayHang))
         {
            this.quayHang.Remove(oldQuayHang);
            oldQuayHang.SetPhongBan((PhongBan)null);
         }
   }
   
   /// <pdGenerated>default removeAll</pdGenerated>
   public void RemoveAllQuayHang()
   {
      if (quayHang != null)
      {
         System.Collections.ArrayList tmpQuayHang = new System.Collections.ArrayList();
         foreach (QuayHang oldQuayHang in quayHang)
            tmpQuayHang.Add(oldQuayHang);
         quayHang.Clear();
         foreach (QuayHang oldQuayHang in tmpQuayHang)
            oldQuayHang.SetPhongBan((PhongBan)null);
         tmpQuayHang.Clear();
      }
   }
   public System.Collections.ArrayList Lam_Viec_Tai;
   
   /// <pdGenerated>default getter</pdGenerated>
   public System.Collections.ArrayList GetLam_Viec_Tai()
   {
      if (Lam_Viec_Tai == null)
         Lam_Viec_Tai = new System.Collections.ArrayList();
      return Lam_Viec_Tai;
   }
   
   /// <pdGenerated>default setter</pdGenerated>
   public void SetLam_Viec_Tai(System.Collections.ArrayList newLam_Viec_Tai)
   {
      RemoveAllLam_Viec_Tai();
      foreach (NhanVien oNhanVien in newLam_Viec_Tai)
         AddLam_Viec_Tai(oNhanVien);
   }
   
   /// <pdGenerated>default Add</pdGenerated>
   public void AddLam_Viec_Tai(NhanVien newNhanVien)
   {
      if (newNhanVien == null)
         return;
      if (this.Lam_Viec_Tai == null)
         this.Lam_Viec_Tai = new System.Collections.ArrayList();
      if (!this.Lam_Viec_Tai.Contains(newNhanVien))
      {
         this.Lam_Viec_Tai.Add(newNhanVien);
         newNhanVien.AddLam_Viec_Tai(this);      
      }
   }
   
   /// <pdGenerated>default Remove</pdGenerated>
   public void RemoveLam_Viec_Tai(NhanVien oldNhanVien)
   {
      if (oldNhanVien == null)
         return;
      if (this.Lam_Viec_Tai != null)
         if (this.Lam_Viec_Tai.Contains(oldNhanVien))
         {
            this.Lam_Viec_Tai.Remove(oldNhanVien);
            oldNhanVien.RemoveLam_Viec_Tai(this);
         }
   }
   
   /// <pdGenerated>default removeAll</pdGenerated>
   public void RemoveAllLam_Viec_Tai()
   {
      if (Lam_Viec_Tai != null)
      {
         System.Collections.ArrayList tmpLam_Viec_Tai = new System.Collections.ArrayList();
         foreach (NhanVien oldNhanVien in Lam_Viec_Tai)
            tmpLam_Viec_Tai.Add(oldNhanVien);
         Lam_Viec_Tai.Clear();
         foreach (NhanVien oldNhanVien in tmpLam_Viec_Tai)
            oldNhanVien.RemoveLam_Viec_Tai(this);
         tmpLam_Viec_Tai.Clear();
      }
   }

}